package com.lemon.reggie.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class EditDishDTO implements Serializable {

    private static final long serialVersionUID = 6611271837573009557L;

    @ApiModelProperty(value = "菜品id")
    @NotNull(message = "菜品id不能为空！")
    private Long id;

    @ApiModelProperty(value = "菜品名称")
    @NotBlank(message = "菜品名称不能为空！")
    private String name;

    @ApiModelProperty(value = "菜品分类id")
    @NotBlank(message = "菜品分类id不能为空！")
    private String categoryId;

    @ApiModelProperty(value = "菜品价格")
    @NotNull(message = "菜品价格不能为空！")
    private BigDecimal price;

    @ApiModelProperty(value = "商品码")
    private String code;

    @ApiModelProperty(value = "图片")
    @NotBlank(message = "图片名称不能为空！")
    private String image;

    @ApiModelProperty(value = "描述信息")
    private String description;

    @ApiModelProperty(value = "0 停售 1 起售")
    private Integer status;

    @ApiModelProperty(value = "菜品口味集合")
    private List<@Valid DishFlavorDTO> flavors;

}
